<template>
	<div>
		<div>
			<span>
				<el-input size='mini' placeholder='请输入用户昵称或手机号' v-model='filter.searchKey' style='width:350px'></el-input>
			</span>
			<span class='m-l-15'>
				<el-button size='mini' type='primary' icon='el-icon-search' @click='search'>搜索</el-button>
			</span>
		</div>
		<section class='m-t-30'>
			<el-table style='width:100%;font-size:12px;' ref='multipleTable' :data='userList'>
				<el-table-column label='用户ID'>
					<template slot-scope='scope'>{{ scope.row.userId }}</template>
				</el-table-column>
				<el-table-column label='头像'>
					<template slot-scope='scope'>
						<img :src='scope.row.photoUrl' style='width:30px;'/>
					</template>
				</el-table-column>
				<el-table-column label='昵称'>
					<template slot-scope='scope'>{{ scope.row.nickName}}</template>
				</el-table-column>
				<el-table-column label='性别'>
					<template slot-scope='scope'>
						<span class='iconfont' style='font-size:20px;' :class='{"icon-male" : scope.row.genDer == 1, "icon-female" : scope.row.genDer == 2}'></span>
					</template>
				</el-table-column>
				<el-table-column label='联系方式'>
					<template slot-scope='scope'>{{ scope.row.mobile }}</template>
				</el-table-column>
				<el-table-column label='订单笔数'>
					<template slot-scope='scope'>{{ scope.row.orderCount }}</template>
				</el-table-column>
				<el-table-column label='账号余额'>
					<template slot-scope='scope'>{{ scope.row.balanceAmount }}</template>
				</el-table-column>
				<el-table-column label='注册时间'>
					<template slot-scope='scope'>
						<span>{{scope.row.registerTime | parseTime('{y}-{m}-{d}')}}</span>
					</template>
				</el-table-column>
				<el-table-column label='操作' width='200'>
					<template slot-scope='scope'>
						<router-link :to='"/user/order/" + scope.row.userId' class='color-primary m-l-15'>查看账单</router-link>
						<router-link :to='"/user/balance/" + scope.row.userId' class='color-primary m-l-15'>余额明细</router-link>
					</template>
				</el-table-column>
			</el-table>
			
			<div class='m-t-30'>
				<pagination ref='pagination' :query='pageQuery' v-on:page='userList = $event' url='user/userList'></pagination>
			</div>
			
		</section>
		
	</div>
</template>

<script src='./index.js'></script>